import React from 'react'
import {
  ActivityIndicator,
  View,
  Text
} from 'react-native'
import commonStyle from '../../config'

export const ListFooterComponent = ({ hasMore }) => {
  if (hasMore == undefined) {
    return <View />
  }

  return (
    <View style={{ justifyContent: 'center', alignItems: 'center', paddingVertical: 15 }}>
      {
        hasMore ?
          <ActivityIndicator
            animating
            color={commonStyle.disabledColor}
            size={'small'}
          /> :
          <Text style={{ color: commonStyle.disabledColor, fontSize: commonStyle.smallFontSize, }}>-- 我也是有底线的 --</Text>
      }
    </View>
  )
}
